//
//  ZJQuestionVC.m
//  这家测试项目
//
//  Created by IOS_DEVELOPER on 2017/7/12.
//  Copyright © 2017年 陈志凌. All rights reserved.
//

#import "ZJQuestionVC.h"
#import "KLTextView.h"
@interface ZJQuestionVC ()
@property (weak, nonatomic) IBOutlet KLTextView *QuestionView;
@property (weak, nonatomic) IBOutlet UIButton *sureBtn;

@end

@implementation ZJQuestionVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.sureBtn setBackgroundColor:[Utils colorWithHexString:allConstHexColor]];
}

- (IBAction)sureBtn:(UIButton *)sender {
    
    NSString *feed = self.QuestionView.text;
    if ([NSString isNullOrEmpty:feed]) {
        [HUD showErrorMsg:@"请输入您宝贵的意见"];
        return;
    }
    
    [HUD showLoading:@"提交中..."];
    NSDictionary *parameter = [LRNetwork requestParameter:@{@"content":self.QuestionView.text}];
    NSString *url = [LRNetwork requestURL:@"cgi/suggestion.php"];
    
    [LRNetwork netRequestPOSTWithRequestURL:url withParameter:parameter withReturnValeuBlock:^(id returnValue) {
        
        [HUD showSucceedMsg:@"提交成功!"];
         [self.navigationController popViewControllerAnimated:YES];
        
    } withErrorCodeBlock:^(NSInteger errorCode, NSString *errorMessage) {
        [HUD showErrorMsg:errorMessage];
    } withFailureBlock:^{
        
    }];
   
}


@end
